Telegram Group & Telegram Channel
⚡️ .NET: валидация Minimal API

В .NET 8 Preview 3 появилась встроенная поддержка валидации для Minimal API — теперь можно использовать атрибуты Required, Range, StringLength и другие прямо в минималистичных контроллерах без лишнего кода.

⚙️ Microsoft добавила официальный пример:
🔗 github.com/captainsafia/minapi-validation-support

🧪 В проекте показано:

- как включить AddValidation() в Program.cs
- как использовать [ValidatableType] для ваших моделей
- как обрабатывать ошибки валидации автоматически

🚀 Чтобы запустить пример:

cd api
dotnet run


✍️ Минимализм + строгая валидация = 🔥 для API!

📌 Github

@csharp_1001_notes



tg-me.com/csharp_1001_notes/667
Create:
Last Update:

⚡️ .NET: валидация Minimal API

В .NET 8 Preview 3 появилась встроенная поддержка валидации для Minimal API — теперь можно использовать атрибуты Required, Range, StringLength и другие прямо в минималистичных контроллерах без лишнего кода.

⚙️ Microsoft добавила официальный пример:
🔗 github.com/captainsafia/minapi-validation-support

🧪 В проекте показано:

- как включить AddValidation() в Program.cs
- как использовать [ValidatableType] для ваших моделей
- как обрабатывать ошибки валидации автоматически

🚀 Чтобы запустить пример:

cd api
dotnet run


✍️ Минимализм + строгая валидация = 🔥 для API!

📌 Github

@csharp_1001_notes

BY C# 1001 notes




Share with your friend now:
tg-me.com/csharp_1001_notes/667

View MORE
Open in Telegram


C 1001 notes Telegram | DID YOU KNOW?

Date: |

What is Telegram Possible Future Strategies?

Cryptoassets enthusiasts use this application for their trade activities, and they may make donations for this cause.If somehow Telegram do run out of money to sustain themselves they will probably introduce some features that will not hinder the rudimentary principle of Telegram but provide users with enhanced and enriched experience. This could be similar to features where characters can be customized in a game which directly do not affect the in-game strategies but add to the experience.

A project of our size needs at least a few hundred million dollars per year to keep going,” Mr. Durov wrote in his public channel on Telegram late last year. “While doing that, we will remain independent and stay true to our values, redefining how a tech company should operate.

C 1001 notes from us


Telegram C# 1001 notes
FROM USA